package com.woniuxy.lab.woniu_lab_boss.controller.form;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiParam;
import lombok.Data;

import javax.validation.constraints.Pattern;

/**
 * @author 17292
 */
@Data
@ApiModel("新增端口方法")
public class AddPortForm {

    @ApiModelProperty(value = "端口号" ,example = "8080")
    @Pattern(regexp = "^[0-9]*$", message = "端口号必须为数字")
    private String port;

    /**
     * 端口类型STATIC/DYNAMIC
     */
    @ApiModelProperty(value = "端口类型" ,example = "STATIC")
    @Pattern(regexp = "^(STATIC|DYNAMIC)$", message = "端口类型必须为STATIC或者DYNAMIC")
    private String type;
}
